package com.echoesnet.echoesshortvideo.Activities;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.request.RequestOptions;
import com.echoesnet.echoesshortvideo.AppController;
import com.echoesnet.echoesshortvideo.Beans.IncludeNavBarBean;
import com.echoesnet.echoesshortvideo.R;
import com.echoesnet.echoesshortvideo.Utils.CommonUtils;
import com.echoesnet.echoesshortvideo.Utils.GlideRoundTransform;
import com.echoesnet.echoesshortvideo.Utils.Image.GlideApp;
import com.echoesnet.echoesshortvideo.databinding.ActivityAboutCompanyBinding;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;


public class AboutCompanyAct extends BaseActivity
{

    @BindView(R.id.iv_appIcon)
    ImageView ivAppIcon;
    @BindView(R.id.tv_app_name)
    TextView tvAppName;
    @BindView(R.id.tv_app_version)
    TextView tvAppVersion;
    @BindView(R.id.tv_app_copyright)
    TextView tvAppCopyright;
    @BindView(R.id.tv_app_netWorkText)
    TextView tvAppNetWorkText;
    private Unbinder unbinder;

    private ActivityAboutCompanyBinding actBinding;
    private IncludeNavBarBean navBean;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        actBinding = DataBindingUtil.setContentView(this, R.layout.activity_about_company);
        navBean = new IncludeNavBarBean(getString(R.string.aboutWe), true);
        actBinding.relNavBar.setNavBean(navBean);
        actBinding.relNavBar.itvLeft.setOnClickListener(view -> finish());
        unbinder = ButterKnife.bind(this);

        tvAppVersion.setText(String.format("V%s", CommonUtils.getVerName(this)));
        tvAppCopyright.setText("Copyright©2016-2018 在线回声");

        GlideApp.with(AppController.getInstance())
                .load(R.mipmap.ic_launcher)
                .apply(RequestOptions.bitmapTransform(new GlideRoundTransform(AppController.getInstance(),15)))
                .into(ivAppIcon);

    }

    @Override
    public void onDestroy()
    {
        super.onDestroy();
        if (unbinder != null)
            unbinder.unbind();
    }


}
